<!DOCTYPE html>
<html  lang="en" xmlns:th="http://www.thymeleaf.org">
	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="/css/curd.css"/>
		<link rel="stylesheet" type="text/css" href="/css/bootstrap.css" />
		<link rel="stylesheet" type="text/css" href="/css/healthManage.css"/>
		<script src="/js/jquery-3.3.1.js" type="text/javascript" charset="utf-8"></script>
		<script src="/js/bootstrap.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<h1 class="text-center">用户管理</h1>
		<div class="container">
			<table class="table table-bordered table-striped table-hover curd-table">
				<thead>
					<tr>
						<th>用户id</th>
						<th>用户姓名</th>
						<th>用户手机号</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<tr th:each="user : ${users}">
						<td th:text="${user.userId}">1</td>
						<td th:text="${user.username}">张三</td>
						<td th:text="${user.userTel}">13332323232</td>
						<td>
							<a class="btn btn-danger" type="button" role="button" th:href="@{/deleteUser(userId=${user.userId})}">删除</a>
						</td>
					</tr>
				</tbody>	
			</table>
			分页
			<div class="row">
				<div class="col-md-6">
					当前<span th:text="${pageInfo.pageNum}"></span>页,
					总<span th:text="${pageInfo.pages}"></span>页,
					总<span th:text="${pageInfo.total}"></span>条记录
				</div>
				<div class="col-md-6">
					<nav aria-label="Page navigation" >
						<ul class="pagination pagination-lg">
							<!--s首页-->
							<li><a href="/userManageUi?pageNum=1">首页</a></li>
							<!--上一页-->
							<li th:if="${pageInfo.hasPreviousPage}" class="sx">
								<a th:href="@{/userManageUi(pageNum=${pageInfo.pageNum - 1})}" aria-label="Previous">
									<span aria-hidden="true">&laquo;</span>
								</a>
							</li>
							<!--遍历-->
							<li th:each="page_Num : ${pageInfo.navigatepageNums}" th:classappend="${page_Num == pageInfo.pageNum}? 'active'">
								<a th:href="'/userManageUi?pageNum='+${page_Num}" th:text="${page_Num}"></a>
							</li>
							<!--下一页-->
							<li th:if="${pageInfo.hasNextPage}" class="sx">
								<a th:href="@{/userManageUi(pageNum=${pageInfo.pageNum + 1})}" aria-label="Next">
									<span aria-hidden="true" >&raquo;</span>
								</a>
							</li>
						</ul>
					</nav>
				</div>
			</div>
		</div>
	</body>
</html>
